package com.example.aepproject.GUI;

import com.example.aepproject.R;
import com.example.aepproject.R.layout;
import com.example.aepproject.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

@SuppressWarnings("deprecation")
public class SelectContent extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.selectcontent);
        
        TabHost tabhost = getTabHost();
        
        TabSpec noticiasTab = tabhost.newTabSpec("Noticias");
        // setting Title and Icon for the Tab
        noticiasTab.setIndicator("Noticias");
        Intent noticiasIntent = new Intent(this, Noticias.class);
        noticiasTab.setContent(noticiasIntent);
         
        TabSpec eventosTab = tabhost.newTabSpec("Eventos");
        // setting Title and Icon for the Tab
        eventosTab.setIndicator("Eventos");
        Intent eventosIntent = new Intent(this, Eventos.class);
        eventosTab.setContent(eventosIntent);
        
     // Adding all TabSpec to TabHost
        tabhost.addTab(noticiasTab);
        tabhost.addTab(eventosTab); 
      
        
    }

    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
    
}
    

